<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="TimeStringParser_en,org.as3lib.kitchensync.utils.TimeStringParser_en,_frameRate,frameRate,parseTimeString" name="keywords">
<title>org.as3lib.kitchensync.utils.TimeStringParser_en</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'TimeStringParser_en - KitchenSyncLib v2.0';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?org/as3lib/kitchensync/utils/TimeStringParser_en.html&amp;org/as3lib/kitchensync/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;TimeStringParser_en</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class TimeStringParser_en"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.as3lib.kitchensync.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class TimeStringParser_en</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="ITimeStringParser.html">ITimeStringParser</a></td>
</tr>
</table>
<p></p>
  Parses a time string into milliseconds.
  Default implementation for english.
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#frameRate">frameRate</a> : int<div class="summaryTableDescription">
   The frameRate is the number of frames per second to use when
   converting timecode and frame values.</div>
</td><td class="summaryTableOwnerCol">TimeStringParser_en</td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_frameRate">_frameRate</a> : int<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TimeStringParser_en</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#TimeStringParser_en()">TimeStringParser_en</a>(frameRate:int = 30)</div>
<div class="summaryTableDescription">
   Constructor.</div>
</td><td class="summaryTableOwnerCol">TimeStringParser_en</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#parseTimeString()">parseTimeString</a>(timeString:String):int</div>
<div class="summaryTableDescription">
   Parses a string into milliseconds.</div>
</td><td class="summaryTableOwnerCol">TimeStringParser_en</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="_frameRate"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_frameRate</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>protected var _frameRate:int</code>
</div>
<a name="frameRate"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">frameRate</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>frameRate:int</code>&nbsp;&nbsp;[read-write]<p>
   The frameRate is the number of frames per second to use when
   converting timecode and frame values.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get frameRate():int</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set frameRate(value:int):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="TimeStringParser_en()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TimeStringParser_en</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function TimeStringParser_en(frameRate:int = 30)</code><p>
   Constructor.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">frameRate</span>:int</code> (default = <code>30</code>)<code></code> &mdash; The framerate in fps to use when converting frames to milliseconds.
        The default value is 30fps. The use of frames in general is deprecated.
   
   </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>
    <div class='listing'><pre>
    KitchenSync.timeStringParser = new TimeStringParser(stage.frameRate);
    </pre></div>
   <p></p>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="parseTimeString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">parseTimeString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function parseTimeString(timeString:String):int</code><p>
   Parses a string into milliseconds.
   Times can use multiple units. Each unit should be separated by a comma or a space.
   Units will only be detected if they are placed after the time value. 
   All times will be returned in milliseconds.
   If no time unit is specified, the result will use null for the time unit and
   the synchronized action will use its default.
            </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeString</span>:String</code> &mdash; - a string representing some ammount of time.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code> &mdash; An int containing the time in milliseconds
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../utils/TimeStringParser_en.html#frameRate" target="">frameRate</a>
</div>
<br>
<span class="label">Example</span>
<br>      <p>
   These are all valid options: <br />
   "1 hour, 2 minutes, 3 seconds, 4 milliseconds" <br />
   "1h2m3s4ms"  <br />
   "5sec,12fr"†  <br />
   "01:23:45;15"† (1h, 23m, 45s, 15f - frames are based on the parser's framerate which defaults to 30fps)  <br />
   ":03" (3s)  <br />
   "300 frames"†  <br />
   "1.25s"  <br />
   "5 milliseconds, 15mins, 6 hrs"  <br />
   "0.25 days"  <br />
   </p>
   
   <p><em>
   †: Frames are interpereted based on the framerate of the parser. They are not recommended 
      because of their inaccuracy and should be considered deprecated. If you must use the frames 
      option, please make sure you have set the frameRate to match the actual frame rate of 
      the swf in the constuctor. 
   </em></p>
   
   <p></p>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
